package mymyoux.io.sockets
{
	import mymyoux.signals.Signal;
	/**
	 * All derived of socket class must implement this interface
	 */
	public interface ISocket
	{
		/**
		 * Destination port
		 */
		function get port():uint;
		/**
		 * Destination IP or IP:port in input
		 */
		function get host():String;
		/**
		 * dispatch(ISocket, error(Event));
		 */
		function get signalError():Signal;
		/**
		 * dispatch(ISocket, connected(boolean));
		 */
		function get signalStatus():Signal;
		/**
		 * dispatch(ISocket, data(ByteArray));
		 */
		function get signalData():Signal;
		/**
		 * Try to connect to the server.
		 */
		function connect():void;
	}
}